/* indent size: 2 */

module.exports = app => {
  const DataTypes = app.Sequelize;

  const Model = app.model.define('service_record', {
    id: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      primaryKey: true,
      autoIncrement:true
    },
    svc_staff_id: {
      type: DataTypes.INTEGER(11),
      allowNull: false
    },
    aged_id: {
      type: DataTypes.INTEGER(11),
      allowNull: false
    },
    start_time: {
      type: DataTypes.TIME,
      allowNull: false,
      defaultValue:DataTypes.literal('CURRENT_TIMESTAMP')
    },
    end_time: {
      type: DataTypes.TIME,
      allowNull: false,
      defaultValue:DataTypes.literal('CURRENT_TIMESTAMP')
    },
    score: {
      type: DataTypes.FLOAT,
      allowNull: false,
      defaultValue:0.00
    },
    text_evalu: {
      type: DataTypes.STRING(1000),
      allowNull: false,
      defaultValue:''
    },
    voice_evalu: {
      type: DataTypes.STRING(200),
      allowNull: false,
      defaultValue: ''
    },
    svc_item_list: {
      type: DataTypes.STRING(255),
      allowNull: false,
      defaultValue: ''
    },
    remark: {
      type: DataTypes.STRING(255),
      allowNull: false,
      defaultValue: ''
    },
    status: {
      type: DataTypes.INTEGER(4),
      allowNull: false,
      defaultValue:1
    }
  }, {
    tableName: 'service_record'
  });

  Model.associate = function() {

  }

  return Model;
};
